#include <cmath>
#include <iostream>
#include <string>
#include <vector>

void dfs(std::string, int);

const std::string num = "0123456789";
std::vector<int> res;


int main() {
    int n = 2;
    
    for (int i = 0; i <=n; ++i) {
        for (int j = 1; j<= 9; ++j){
            dfs(num.substr(j,1), i);
        }
    }

    for (auto i : res) {
        std::cout << i << ',';
    }
    
}

void dfs(std::string pre, int deep) {
    if (deep == 0) {
        res.emplace_back(std::stoi(pre));
    } else {
        for (auto c: num)
        dfs(pre + c, deep-1);
    }
}